import Mock from "mockjs";
const Random = require("mockjs").Random;
const { newList, studentstatusList, grudutionList, teacherList } = Mock.mock({
  "newList|80": [
    {
      "submitted|1-5": 5,
      "calledBack|1-5": 1,
      // createDate: "@cparagraph(5,15)",
      // img_url: Random.image("100x100"),
      createDate: "@date(MM-dd)"
      // label: "@ctitle(6)"
    }
  ],
  "studentstatusList|5": [
    {
      "submitted|1-5": 5,
      "calledBack|1-5": 5,
      // createDate: "@cparagraph(5,15)",
      // img_url: Random.image("100x100"),
      createDate: "@date(MM-dd)"
      // label: "@ctitle(6)"
    }
  ],
  "grudutionList|2": [
    {
      "submitted|1-5": 5,
      "calledBack|1-5": 5,
      // createDate: "@cparagraph(5,15)",
      // img_url: Random.image("100x100"),
      createDate: "@date(MM-dd)"
      // label: "@ctitle(6)"
    }
  ],
  "teacherList|3": [
    {
      "submitted|1-5": 10,
      "calledBack|1-5": 10,
      // createDate: "@cparagraph(5,15)",
      // img_url: Random.image("100x100"),
      createDate: "@date(MM-dd)"
      // label: "@ctitle(6)"
    }
  ]
});



const getQuery = (url, name) => {
  // const res = url.split('?')
  // console.log(res[1].split('&'));
};

Mock.mock(/\/api\/get\/newborn/, "get", options => {
  // getQuery(options.url, "asdas");

  return {
    status: 200,
    message: "获取新生列表数据成功",
    list: newList,
    total: newList.length
  };
});

Mock.mock(/\/api\/get\/grudution/, "get", options => {
  // getQuery(options.url, "asdas");

  return {
    status: 200,
    message: "获取新生列表数据成功",
    list: grudutionList,
    total: grudutionList.length
  };
});
Mock.mock(/\/api\/get\/studentstatus/, "get", options => {
  // getQuery(options.url, "asdas");

  return {
    status: 200,
    message: "获取新生列表数据成功",
    list: studentstatusList,
    total: studentstatusList.length
  };
});
Mock.mock(/\/api\/get\/studentstatus/, "get", options => {
  // getQuery(options.url, "asdas");

  return {
    status: 200,
    message: "获取新生列表数据成功",
    list: studentstatusList,
    total: studentstatusList.length
  };
});
Mock.mock(/\/api\/get\/teacher/, "get", options => {
  // getQuery(options.url, "asdas");

  return {
    status: 200,
    message: "获取新生列表数据成功",
    list: teacherList,
    total: teacherList.length
  };
});

Mock.mock(/\/api\/blog\/detail/, "get", options => {
  options.url;
});
